from pathlib import Path

currentPath = Path.cwd()  # 返回文件当前所在目录
homePath = Path.home()  # 返回用户的主目录
print("文件当前所在目录:%s\n用户主目录:%s" % (currentPath, homePath))
